package com.alpha.eceasy.mall.api.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author huangpengfei
 */
@Data
public class MallCommodityImportDTO {
    /**
     * 品类category
     */
    @ExcelProperty(value = "商品分类（一级）")
    @Schema(description =  "一级品类名称")
    private String categoryNameLevelOne;

    @ExcelProperty(value = "商品分类（二级）")
    @Schema(description =  "二级品类名称")
    private String categoryNameLevelTwo;
    /**
     * 商品commodity
     */
    @ExcelProperty(value = "商品名称")
    @Schema(description =  "商品名称")
    private String value;

    @ExcelProperty(value = "商品类型：1处方,2非处方,3普通商品,5奖励商品,6跨境商品")
    @Schema(description =  "0=未设置,1=处方,2=非处方,3=普通商品,4=活动包,5=奖励商品,6=跨境商品")
    private Integer type;

    @ExcelProperty(value = "封面图(非必填)")
    @Schema(description =  "封面图")
    private String icon;

    @ExcelProperty(value = "商品标签")
    @Schema(description =  "标签")
    private String label;
    /**
     * 规格specification
     */
    @ExcelProperty(value = "商品编码")
    @Schema(description =  "货号（药品编号）")
    private String specificationBarCode;

    @ExcelProperty(value = "规格")
    @Schema(description =  "规格名称")
    private String specificationName;

    @ExcelProperty(value = "生产厂家")
    @Schema(description =  "生产厂家")
    private String specificationHospDrugManuf;

    @ExcelProperty(value = "零售价")
    @Schema(description =  "销售价格")
    private BigDecimal specificationPrice;

    @ExcelProperty(value = "成本价")
    @Schema(description =  "成本价格")
    private BigDecimal specificationCostPrice;

    @ExcelProperty(value = "商品类型")
    @Schema(description =  "商品类型（化学药、中成药）")
    private String specificationDrugsType;
    /** 用品使用频度 */
    @ExcelProperty(value = "用品使用频度(非必填)(如：每天三次)")
    private String frequency;
    /** 每次用量 */
    @ExcelProperty(value = "每次用量数值(非必填)(如：3)")
    private String dosage;

    public String getFrequency() {
        return frequency;
    }

    public void setFrequency(String frequency) {
        this.frequency = frequency == null? "每天三次": frequency;
    }

    public String getDosage() {
        return dosage;
    }

    public void setDosage(String dosage) {
        this.dosage = dosage == null ? "3" : dosage;
    }

    @ExcelProperty(value = "对应疾病(非必填)")
    @Schema(description =  "对应疾病")
    private String specificationDisease = "无";

    @ExcelProperty(value = "对应症状(非必填)")
    @Schema(description =  "对应症状")
    private String specificationSymptom = "无";
    /**
     * 详情detail
     */
    @ExcelProperty(value = "主图(非必填)(轮播图)")
    @Schema(description =  "主图轮播图")
    private String detailCover;

    @ExcelProperty(value = "详情图片(非必填)")
    @Schema(description =  "详情图")
    private String detailContent;
    /**
     * 药品说明pharmacyInstruction
     */
//    @ExcelProperty(value = "通用名称")
//    @Schema(description =  "通用名称")
//    private String instructionName;
//
//    @ExcelProperty(value = "功能主治")
//    @Schema(description =  "功能主治")
//    private String instructionFunction;
//
//    @ExcelProperty(value = "用法用量")
//    @Schema(description =  "用法用量")
//    private String instructionUsage;
//
//    @ExcelProperty(value = "禁忌")
//    @Schema(description =  "禁忌")
//    private String instructionTaboo;
//
//    @ExcelProperty(value = "有效期（月）")
//    @Schema(description =  "有效期")
//    private String instructionValidity;
//
//    @ExcelProperty(value = "注意事项")
//    @Schema(description =  "注意事项")
//    private String instructionNotice;

    @ExcelProperty(value = "商品批号")
    @Schema(description =  "药品批号/批准文号")
    private String instructionApproval;
}
